package com.videoanswer.van.service.user.impl;

import com.videoanswer.van.persistence.dao.user.UserDaoService;
import com.videoanswer.van.persistence.domain.user.User;
import com.videoanswer.van.service.user.UserService;
import com.videoanswer.van.service.user.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * Created with IntelliJ IDEA.
 * User: Darren
 * Date: 10/16/13
 * Time: 4:25 PM
 * To change this template use File | Settings | File Templates.
 */
@Repository
public class UserServiceImpl implements UserService{

    @Autowired
    private UserDaoService userDaoService;

    @Override
    public UserModel register(UserModel userModel) {
        UserModel user = (UserModel)userDaoService.insertUser(userModel);

        return user;
    }

    @Override
    public UserModel login(String email, String password) {

        return (UserModel)userDaoService.login(email,password);
    }
}
